<%@ page contentType="text/html;charset=UTF-8"%>
<%@ include file="/WEB-INF/views/include/taglib.jsp"%>
<html>
<head>
<meta name="decorator" content="sysDefault" />
<script type="text/javascript">
	$(document).ready(
			function() {

				$("#name").focus();
				$("#categoryForm")
						.validate(
								{
									submitHandler : function(form) {
										Oosp_Loading('正在提交，请稍等...');
										form.submit();
									},
									errorContainer : "#messageBox",
									errorPlacement : function(error, element) {
										$("#messageBox").text("输入有误，请先更正。");
										if (element.is(":checkbox")
												|| element.is(":radio")
												|| element.parent().is(
														".input-append")) {
											error.appendTo(element.parent()
													.parent());
										} else {
											error.insertAfter(element);
										}
									}
								});
			});

	function changeSelect(id, value) {
		$("" + id + "").val(value);
	}
</script>
</head>
<body>


	<div class="container-fluid">
		<div class="row">
			<div class="col-xs-12">
				<div class="panel panel-default">
					<div class="panel-heading">
						<h3 class="panel-title">
							类别新增 <a class="btn btn-default btn-sm pull-right" role="button"
								href="javascript:void(0)" onclick="history.go(-1)">返回</a>
						</h3>
					</div>
					<div class="panel-body">
						<form id="categoryForm" action="${contextPath}/sys/base/save"
							method="post">

							<input id="id" name="id"
								style="display: none;" />
								<input id="parentid" name="parentid" value="${sysCategory.parent.id}"
								style="display: none;" />

							<tags:message content="${message}" />
							<div class="form-group">
								<div class="col-sm-6">
									<label class="col-sm-2 control-label">类别名称:</label>
									<div class="col-sm-8">
										<input id="name" name="name"
											value="${sysCategory.name}" class="form-control" />
									</div>

								</div>
								<div class="col-sm-6">
									<label class="col-sm-2 control-label">类型:</label>
									<div class="col-sm-8">
										<input id="type" name="type"
											value="${sysCategory.type
											}" class="form-control" />
									</div>
								</div>
							</div>


							<div class="form-group">
								<div class="col-sm-6">
									<label class="col-sm-2 control-label">创建人:</label>
									<div class="col-sm-8">
										<input id="createBy" name="createBy" class="form-control"
											disabled />
									</div>
								</div>
								<div class="col-sm-6">
									<label class="col-sm-2 control-label">创建时间:</label>
									<div class="col-sm-8">
										<input id="createTime" name="createTime" type="text" disabled
											class="form-control"
											value="<fmt:formatDate value="${sysCategory.createTime}" pattern="yyyy-MM-dd HH:mm:ss"/>" />
									</div>
								</div>
							</div>
							<div class="form-group">
								<div class="col-sm-offset-1 col-sm-10">
									<input class="btn btn-primary" type="submit" value="保 存" /> <input
										class="btn btn-default" type="button" value="返 回"
										onclick="history.go(-1)" />
								</div>
							</div>
						</form>
					</div>
				</div>
			</div>
		</div>


		<!-- Modal -->
		<div class="modal fade" id="myModal" tabindex="-1" role="dialog"
			aria-labelledby="myModalLabel" aria-hidden="true">
			<div class="modal-dialog">
				<div class="modal-content">
					<div class="modal-header">
						<button type="button" class="close" data-dismiss="modal"
							aria-hidden="true">&times;</button>
						<h4 class="modal-title" id="myModalLabel">选取图标</h4>
					</div>
					<div class="modal-body"></div>
					<div class="modal-body">

						<a href="#"><span class="glyphicon glyphicon-search"></span></a> <a
							href="#"><span class="glyphicon glyphicon-adjust"></span></a> <a
							href="#"><span class="glyphicon glyphicon-align-center"></span></a>

						<a href="#"><span class="glyphicon glyphicon-align-left"></span></a>
						<a href="#"><span class="glyphicon glyphicon-align-right"></span></a>
						<a href="#"><span class="glyphicon glyphicon-arrow-down"></span></a>
						<a href="#"><span class="glyphicon glyphicon-arrow-left"></span></a>

						<a href="#"><span class="glyphicon glyphicon-arrow-right"></span></a>
						<a href="#"><span class="glyphicon glyphicon-arrow-upt"></span></a>
						<a href="#"><span class="glyphicon glyphicon-asterisk"></span></a>
						<a href="#"><span class="glyphicon glyphicon-backward"></span></a>

						<a href="#"><span class="glyphicon glyphicon-ban-circle"></span></a>
						<a href="#"><span class="glyphicon glyphicon-barcode"></span></a>
						<a href="#"><span class="glyphicon glyphicon-bell"></span></a> <a
							href="#"><span class="glyphicon glyphicon-bold"></span></a> <a
							href="#"><span class="glyphicon glyphicon-book"></span></a> <a
							href="#"><span class="glyphicon glyphicon-bookmark"></span></a> <a
							href="#"><span class="glyphicon glyphicon-briefcase"></span></a>
						<a href="#"><span class="glyphicon glyphicon-bullhorn"></span></a>


						<a href="#"><span class="glyphicon glyphicon-camera"></span></a> <a
							href="#"><span class="glyphicon glyphicon-certificate"></span></a>
						<a href="#"><span class="glyphicon glyphicon-check"></span></a> <a
							href="#"><span class="glyphicon glyphicon-chevron-down"></span></a>


						<a href="#"><span class="glyphicon glyphicon-chevron-left"></span></a>
						<a href="#"><span class="glyphicon glyphicon-chevron-right"></span></a>
						<a href="#"><span class="glyphicon glyphicon-chevron-up"></span></a>
						<a href="#"><span
							class="glyphicon glyphicon-circle-arrow-down"></span></a> <a href="#"><span
							class="glyphicon glyphicon-circle-arrow-left"></span></a> <a href="#"><span
							class="glyphicon glyphicon-circle-arrow-right"></span></a> <a
							href="#"><span class="glyphicon glyphicon-circle-arrow-up"></span></a>
						<a href="#"><span class="glyphicon glyphicon-cloud"></span></a> <a
							href="#"><span class="glyphicon glyphicon-cloud-upload"></span></a>
						<a href="#"><span class="glyphicon glyphicon-cog"></span></a> <a
							href="#"><span class="glyphicon glyphicon-collapse-down"></span></a>
						<a href="#"><span class="glyphicon glyphicon-collapse-up"></span></a>
						<a href="#"><span class="glyphicon glyphicon-comment"></span></a>
						<a href="#"><span class="glyphicon glyphicon-compressed"></span></a>
						<a href="#"><span class="glyphicon glyphicon-copyright-mark"></span></a>

						<a href="#"><span class="glyphicon glyphicon-folder-close"></span></a>

						<a href="#"><span class="glyphicon glyphicon-folder-open"></span></a>
					</div>
					<div class="modal-footer">
						<button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
					</div>
				</div>
				<!-- /.modal-content -->
			</div>
			<!-- /.modal-dialog -->
		</div>
		<!-- /.modal -->
	</div>
</body>
</html>